﻿@model IEnumerable<Vcare.Models.Companies>

@{
    ViewBag.Title = "SMEs";
}
<hgroup class="title">
    <h1>@ViewBag.Title.</h1>
</hgroup>
<article>
    <a href="@(Url.Action("Create"))"><img src="../../Images/add.png" /></a>
    <div class="spacer"></div>
</article>
<table   class="listtable contactstable" cellspacing="0" cellpadding="0">
    <tr>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Company)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Address1)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Address2)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.District)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Town)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.County)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Postcode)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Telephone)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.WWW)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.CreditChecked)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Alias)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Category)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.CoNumber)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.Tel2)
        </th>
        <th   class="tableheader clickcolumn">
            @Html.DisplayNameFor(model => model.DefaultTelephoneField)
        </th>
        <th   class="tableheader clickcolumn"></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Company)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.District)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Town)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.County)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Postcode)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Telephone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.WWW)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreditChecked)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Alias)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Category)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CoNumber)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tel2)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DefaultTelephoneField)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.CompanyID }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.CompanyID })
        </td>
    </tr>
}

</table>
<div class="spacer"></div>
<div class="spacer"></div>